import React,{useCallback,useState} from 'react';
import {Button, Card, Modal, notification} from "antd";
/**
 * useCallBack
 * @returns {JSX.Element}
 * @constructor
 */
export const UseCallBackHooks = function () {

    const  [num, setNum] = useState(0);

    const handler = useCallback(count=>{
        setNum(count);
    },[])

    return (
        <>
            <div>
                {num}
            </div>
            <Button type={'link'} onClick={()=>handler(1)}>+</Button>
        </>
    )

};